using System.Collections.Generic;

public class ResourceQueue<T>
{
	private LinkedList<T> list = new LinkedList<T>();

	public int Count
	{
		get
		{
			return list.Count;
		}
	}

	public void Enqueue(T t)
	{
		list.AddLast(t);
	}

	public T Dequeue()
	{
		T value = list.First.Value;
		list.RemoveFirst();
		return value;
	}

	public T Peek()
	{
		return list.First.Value;
	}

	public bool Remove(T t)
	{
		return list.Remove(t);
	}

	public void Print()
	{
		string text = string.Empty;
		foreach (T item in list)
		{
			text = string.Concat(text, item, " \n");
		}
		BCWDebug.LogError(text);
	}
}
